<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Vessel_type_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-vessel_type_id" data-rule="required" data-source="vessel_type/index" class="form-control selectpage" name="row[vessel_type_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" data-rule="required" class="form-control" name="row[number]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Specs_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                <label>
                    <input id="row[specs_id]-1" name="row[specs_id]" type="radio" value="1" checked/> 按人数
                </label>

                <label>
                    <input id="row[specs_id]-2" name="row[specs_id]" type="radio" value="2"/> 按船
                </label>
            </div>

            <p style="color: red">温馨提示：此选项是陈志~</p>
        </div>
    </div>
    <div class="form-group c-min_time" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Min_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-min_time"  class="form-control" name="row[min_time]" type="number">
        </div>
    </div>
    <div class="form-group c-after_price" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('After_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-after_price"  class="form-control" step="0.01" name="row[after_price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group c-after_min_time" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('After_min_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-after_min_time"  class="form-control" name="row[after_min_time]" type="number">
        </div>
    </div>
    <div class="form-group c-deposit" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Deposit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-deposit"  class="form-control" step="0.01" name="row[deposit]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('Is_show')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--                        -->
    <!--            <select  id="c-is_show" data-rule="required" class="form-control selectpicker" name="row[is_show]">-->
    <!--                {foreach name="isShowList" item="vo"}-->
    <!--                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>-->
    <!--                {/foreach}-->
    <!--            </select>-->

    <!--        </div>-->
    <!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script src="/assets/libs/art-template/test/js/jquery-1.7.2.min.js"></script>
<script>
    $(document).ready(function() {
        $('input[type=radio][name=row[specs_id]]').change(function() {
            if (this.value == 1) {
                $(".c-min_time").css("display","none");
                $(".c-after_price").css("display","none");
                $(".c-after_min_time").css("display","none");
                $(".c-deposit").css("display","none");
            }
            else if (this.value == 2) {
                $(".c-min_time").css("display","block");
                $(".c-after_price").css("display","block");
                $(".c-after_min_time").css("display","block");
                $(".c-deposit").css("display","block");
            }
        });
    });
</script>